package src.utils;

public class NormalFunction implements ProbabilityDistributionFunction{

	double mu;
	double sigma;
	
	public NormalFunction(double mean, double sigma){
		this.mu = mean;
		this.sigma = sigma;
	}

	public double evaluate(double x) {
		double argument = (x-mu)/sigma;
		return Math.exp(-argument*argument/2)/(sigma*Math.sqrt(2*Math.PI));
	}
	
	public String name(){
		return "normal";
	}
}
